package com.dt.dubai.search.repository;

import com.dt.dubai.search.entity.bean.EsProductBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * 商品ES操作类
 * Created by macro on 2018/6/19.
 */

public interface EsProductRepository extends ElasticsearchRepository<EsProductBean, Long> {
    /**
     * 搜索查询
     *
     * @param commodityTitle 商品名称
     * @param subTitle       商品标题
     * @return
     */
    /*Page<EsProductBean> findByNameOrSubTitleOrKeywords(String name, String subTitle, String keywords, Pageable page);*/
    Page<EsProductBean> findByCommodityTitleOrSubTitle(String commodityTitle, String subTitle, Pageable page);

}
